package com.aprilTomCat.Servlet;

import java.io.IOException;

public abstract class HttpServlet {
    public abstract void doGet(HttpServetRequest request, HttpServetResponse response) throws IOException;

    public abstract void doPost(HttpServetRequest request, HttpServetResponse response) throws IOException;

    public void service(HttpServetRequest request, HttpServetResponse response) throws IOException {
        if("GET".equals(request.getMethod())){
            doGet(request,response);
        }else if("POST".equals(request.getMethod())){
            doPost(request,response);
        }
    }
}
